package com.ruoyi.biz.domain.dto;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author tds
 * @version 1.0.0
 * @Company
 * @ClassName CaculateGoodsDto
 * @Description 计算商品价格dto
 * @Date 2022-11-10 22:40
 */
@Data
public class CaculateGoodsDto implements Serializable {

    /**
     * 折扣
     */
    @NotNull(message = "折扣不能为空")
    @Min(value = 0, message = "折扣必须大于等于0")
    private BigDecimal discount;

    /**
     * 面积
     */
    @NotNull(message = "面积")
    @Min(value = 0, message = "面积必须大于等于0")
    private BigDecimal size;

    /**
     * 商品类别id
     */
    @NotNull(message = "商品类别id不能为空")
    private Long goodsId;
}
